Skip to content

feat(agent-sdk): coverage-unmapped downgrade for near-empty test graphs (6F.6 defensive half, F3)#53

Merged
officialCodeWork merged 1 commit into
developmentfrom
build/phase-6f/step-6f.6-coverage-unmapped
Jul 15, 2026
Merged

feat(agent-sdk): coverage-unmapped downgrade for near-empty test graphs (6F.6 defensive half, F3)#53
officialCodeWork merged 1 commit into
developmentfrom
build/phase-6f/step-6f.6-coverage-unmapped

Conversation

@officialCodeWork

Copy link
Copy Markdown
Owner

Summary

The last open item from the original tester feedback: the field run produced 1 covered-by edge across a whole app, so every context bundle falsely warned untested — near-universal noise.

buildBundle now, when test files exist but < 5% of components carry a covered-by edge, emits one honest graph-level note:

coverage-unmapped — only N/M components have mapped test coverage; "untested" is unreliable for this graph

instead of a per-component false untested. A genuinely test-free repo (no test nodes at all) keeps the accurate per-component untested.

Why only the "defensive half"

6F.6 had two halves. This PR ships the output-side downgrade — the part that actually caused the tester's complaint (noise). The detection half (resolving custom render wrappers, alias-imported test files, suites outside __tests__) is not in this PR because I could not reproduce the field failure: the renderWithProviders fixture shape already maps to covered-by edges, and scanning Grafana's frontend produced 1,009 covered-by edges — so detection works on real code. Building it blind risks the wrong fix; it waits on a real failing test file from the tester.

Verification

  • 3 new agent-sdk unit tests: near-empty coverage → coverage-unmapped; healthy coverage → per-component untested; no tests → untested.
  • Real-graph check: Grafana (34% coverage) correctly keeps per-component untested, no spurious downgrade.
  • 231 tests green · eval 297/0/0/0, gate OK, all metrics 1.000.

🤖 Generated with Claude Code

…hs (6F.6, F3)

The field run found 1 covered-by edge across a whole app, so every bundle
falsely warned "untested" — near-universal noise. buildBundle now, when test
files exist but < 5% of components carry a covered-by edge, emits one honest
graph-level note ("coverage-unmapped — only N/M components have mapped test
coverage") instead of a per-component false "untested". A genuinely test-free
repo (no test nodes) keeps the accurate "untested".

3 agent-sdk unit tests (near-empty -> downgrade, healthy -> keep, no-tests ->
keep). Verified on the real Grafana graph (34% coverage -> per-component
"untested" preserved, no spurious downgrade).

This is the defensive half of 6F.6. The detection half (custom render
wrappers / alias-imported / outside-__tests__ test resolution) stays open:
could not reproduce the field failure — the renderWithProviders fixture shape
already maps and Grafana yielded 1,009 covered-by edges — so it waits on a
real failing test file from the tester.

Tests 231 green; eval 297/0/0/0, gate OK.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@officialCodeWork
officialCodeWork merged commit ec0b889 into development Jul 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants